package indi.entity;

public class Title {
	//ISBN
	public String ISBN;
	// 作者
	public String author;
	//总数
	public int totalNum;
	// 书名
	public String bookName;
	//价格
	public float price;
	//图书还是杂志
	public String type;
	/*补充属性*/
	//是否在馆表示
	private boolean inLibrary;
	//关联借阅证
	private Card currentCard;
	//关联借书记录
	private Record currentRecord;
	// 借阅次数
	private int countOfBorrowed;
	// 如果图书馆有对应的ID编号方式，则此类需要
	private String idOfLibrary;
	//保存时间
	private int maintainPeriod;

		
	
	
	// 待修改
	public Title(String ISBN, String author, int totalNum, 
			String bookName, float price, String type) {
		this.ISBN = ISBN;
		this.author = author;
		this.totalNum = totalNum;
		this.bookName = bookName;
		this.price = price;
		this.type = type;
		this.inLibrary = true;
	}

	public Title(Title title) {
		this(title.ISBN, title.author, title.totalNum,
				title.bookName, title.price, title.type);
	}
	
	public String toString() {
		return author + "|" + bookName  + "|" + ISBN
				+ "|" + inLibrary;
	}
	
	public void setMaintainPeriod(int maintainPeriod) {
		this.maintainPeriod = maintainPeriod;
	}
	/**
	 * @return the iSBN
	 */
	public String getISBN() {
		return ISBN;
	}

	/**
	 * @param iSBN the iSBN to set
	 */
	public void setISBN(String iSBN) {
		ISBN = iSBN;
	}

	/**
	 * @return the author
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * @param author the author to set
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * @return the totalNum
	 */
	public int getTotalNum() {
		return totalNum;
	}

	/**
	 * @param totalNum the totalNum to set
	 */
	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}

	/**
	 * @return the bookName
	 */
	public String getBookName() {
		return bookName;
	}

	/**
	 * @param bookName the bookName to set
	 */
	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	/**
	 * @return the price
	 */
	public float getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(float price) {
		this.price = price;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the onLibarary
	 */
	public boolean isInLibrary() {
		return inLibrary;
	}

	/**
	 * @param onLibarary the onLibarary to set
	 */
	public void setInLibrary(boolean onLibarary) {
		this.inLibrary = onLibarary;
	}

	

	/**
	 * @return the currentCard
	 */
	public Card getCurrentCard() {
		return currentCard;
	}

	/**
	 * @param currentCard the currentCard to set
	 */
	public void setCurrentCard(Card currentCard) {
		this.currentCard = currentCard;
	}

	/**
	 * @return the currentRecord
	 */
	public Record getCurrentRecord() {
		return currentRecord;
	}

	/**
	 * @param currentRecord the currentRecord to set
	 */
	public void setCurrentRecord(Record currentRecord) {
		this.currentRecord = currentRecord;
	}

	public int getCountOfBorrowed() {
		// TODO Auto-generated method stub
		return countOfBorrowed;
	}

	public void setCountOfBorrowed(int i) {
		countOfBorrowed = i;
	}

	public void setAll(Title copyTitle) {
		// TODO Auto-generated method stub
		
	}
	
//	public boolean isInLibrary() {
//		return inLibrary;
//	}
	
}
